package com.cs2340.taskplusplus;

/**
 * Label class holds label info
 * @author GRILLENBANNER
 */
public class Label 
{
	private String name, parent;
	
	/**
	 * Label constructor
	 */
	public Label(String parent, String name)
	{
		this.parent = parent;
		this.name = name;
	}
	
	/**
	 * simple setter
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * simple getter
	 * @return
	 */
	public String getName() {
		return name;
	}

	/**
	 * simple setter
	 * @param parent
	 */
	public void setParent(String parent) {
		this.parent = parent;
	}

	/**
	 * simple getter
	 * @return
	 */
	public String getParent() {
		return parent;
	}
	
	/**
	 * Determines equality based on name and parent
	 */
	public boolean equals(Object o)
	{
		Label l = (Label) o;
		if ((l.getName().equals(this.name)) && (l.getParent().equals(this.parent)))
			return true;
		else
			return false;
	}
}
